#/****************************************************************************
#**
#** Copyright (C) 2019 The LSSEC Ltd.
#** Contact: https://www.qt.io/licensing/
#**
#** This file is part of the tools applications of the CFS.
#**
#**
#** $PRO_END_LICENSE$
#**
#****************************************************************************/
#include
include(../../BaseTotalPri/BaseTotal.pri)

# CODE   GBK UTF-8 UTF-16BE
CODECFORSRC=GBK

#define USING_GUI
#DEFINES     += USING_GUI
contains(DEFINES,USING_GUI){
QT          += core gui widgets xml
}else{
QT          += core xml
QT          -= gui
}


# TYPE  app lib sudbirs
TEMPLATE = lib


# CONFIG
CONFIG += build_all c++11
CONFIG += debug_and_relased

# TARGET
#TARGET = $$qtLibraryTarget(MainManager)
TARGET = MainManager

#PROJECT_PATH
INCLUDE_DIR     = $${DEV_HOME}/include
DEST_DIR_D      = $${DEV_HOME}/dbin$${QT_VERSION}
DEST_DIR_R      = $${DEV_HOME}/rbin$${QT_VERSION}
LIB_DIR_D       = $${DEV_HOME}/dbin$${QT_VERSION}
LIB_DIR_R       = $${DEV_HOME}/rbin$${QT_VERSION}


# INCLUDE_PATH
INCLUDEPATH += $${INCLUDE_DIR}
INCLUDEPATH += $${INCLUDE_DIR}/CFSCoreFrame
INCLUDEPATH += $${INCLUDE_DIR}/CFSPluginFrame
INCLUDEPATH += $${INCLUDE_DIR}/Service


# OUT_INFO
win32{
CONFIG(debug,debug|release){
    DESTDIR = $${DEST_DIR_D}/plugins
#    TARGET = $$member(TARGET, 0)d
    LIBS += -L$$PWD/../../libs/
    LIBS += -L$$DEST_DIR_D/
    LIBS += -lCFSCore
    LIBS += -lCFSPluginFrame
}
CONFIG(release,debug|release){
    DESTDIR = $${DEST_DIR_R}/plugins
#    TARGET = $$member(TARGET, 0)r
    LIBS += -L$$PWD/../../libs/
    LIBS += -L$$DEST_DIR_R/
    LIBS += -lCFSCore
    LIBS += -lCFSPluginFrame
}
}
else:unix{
CONFIG(debug,debug|release){
    DESTDIR = $${DEST_DIR_D}/plugins
    LIBS += -L$${DEST_DIR_D}
    LIBS += -lCFSCore
    LIBS += -lCFSPluginFrame
}
CONFIG(release,debug|release){
    DESTDIR = $${DEST_DIR_R}/plugins
    LIBS += -L$${DEST_DIR_R}
    LIBS += -lCFSCore
    LIBS += -lCFSPluginFrame
}
}


#ASSERTIONS
DEFINES += FRAMEWORK_LIBRARY
DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_NO_DEBUG
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


# other
OTHER_FILES +=

# builder
QMAKE_CXXFLAGS +=

# language
CONFIG += localize_deployment
SYMBIAN_SUPPORTED_LANGUAGES += zh_CN
SYMBIAN_LANG.zh_CN = 31
TRANSLATIONS = $${TARGET}_zh_CN.ts


# depends
DEPENDPATH +=


#SOURCES_FILE
SOURCES += \
    mainmanageractivator.cpp \
    mainmanagerservice.cpp \
    apphelper.cpp


#HEADERS_FILE
HEADERS += \
    imainmanagerservice.h \
    mainmanageractivator.h \
    mainmanagerservice.h \
    apphelper.h

#FORMS_FILE
FORMS +=

#MAINFRAMEWORK_LOGO
RC_FILE =

#RESOURCES_FILE
RESOURCES += \
    $$PWD/mainmanager.qrc


#HeadPath = $$absolute_path($$PWD\\imainmanagerservice.h)
##message(------------$${HeadPath})
#CopyDir = $$absolute_path($${INCLUDE_DIR}\\$$TARGET\\)

#HeadPath = $$replace(HeadPath, /, \\)
#CopyDir = $$replace(CopyDir, /, \\)

#!exists($$CopyDir)
#{
#    mkpath($$CopyDir)
#}

#QMAKE_POST_LINK += copy  $$HeadPath $$CopyDir

#QMAKE_POST_LINK +=cp  ../bin*.lib ../../bin

HeadPath = $$absolute_path($$PWD\\..\\$$TARGET\\imainmanagerservice.h)
CopyDir = $$absolute_path($${DEV_HOME}\\include\\$$TARGET\\)

HeadPath = $$replace(HeadPath, /, \\)
CopyDir = $$replace(CopyDir, /, \\)

!exists($$CopyDir)
{
    mkpath($$CopyDir)
}

QMAKE_POST_LINK += copy  $$HeadPath $$CopyDir

